﻿'use strict';
import AppConfig from '../config.js';
import FetchEx from '../utils/fetchEx';
import FetchMock from 'fetch-mock';

FetchMock.post('/UserLoginIn', {result: 1,msg:'登录成功',obj:{userID:10000,gender:1,portrait:'https://static.oschina.net/uploads/user/432/865529_100.jpg'}});

export function UserLoginIn(userName,passward) {
	let formData = new FormData();
	formData.append('username',userName);
	formData.append('pwd',passward);
	return FetchEx.timeout(AppConfig.FetchTimeout,FetchEx.post('UserLoginIn',formData));
}